#pragma once
#include <iostream>

using namespace std;

class Data
{
private:
	int _year;
	int _month;
	int _day;

public:
	Data(int year = 1, int month = 1, int day = 1);

	void Print();

	int GetMonthDay(int year,int month)
	{
		static int monthDayArray[] = { -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
		if (month == 2 && ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)))
		{
			return 29;
		}
		return monthDayArray[month];
	}

	bool operator==(Data& d);

	bool operator>(Data& d);

	bool operator<(Data& d);

	Data& operator+=(int n);

	Data operator+(int day);

	Data& operator-=(int day);

	Data operator-(int day);


};
